<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"     
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEstacaoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">

            <h:form>               
                <p:panel id="panel">
                    <f:facet name="header">
                        <h:outputText value="#{bundle.LegendEstacaoTitle}"/>
                    </f:facet>

                    <h:panelGrid columns="3" >

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estId}" for="estId" />
                        <p:inputText id="estId" value="#{estacaoController.selected.estId}" title="#{bundle.CreateEstacaoTitle_estId}" required="true" requiredMessage="#{bundle.CreateEstacaoRequiredMessage_estId}"/>
                        <p:message for="estNm" />                         

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estNm}" for="estNm" />
                        <p:inputText id="estNm" value="#{estacaoController.selected.estNm}" title="#{bundle.CreateEstacaoTitle_estNm}" required="true" requiredMessage="#{bundle.CreateEstacaoRequiredMessage_estNm}"/>                        
                        <p:message for="estNm" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdPlu}" for="estCdPlu" />
                        <p:inputText id="estCdPlu" value="#{estacaoController.selected.estCdPlu}" title="#{bundle.CreateEstacaoTitle_estCdPlu}" />                                                                       
                        <p:message for="estCdPlu" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdFlu}" for="estCdFlu" />
                        <p:inputText id="estCdFlu" value="#{estacaoController.selected.estCdFlu}" title="#{bundle.CreateEstacaoTitle_estCdFlu}" />
                        <p:message for="estCdFlu" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estIcCampanha}" for="estIcCampanha" />
                        <p:inputText id="estIcCampanha" value="#{estacaoController.selected.estIcCampanha}" title="#{bundle.CreateEstacaoTitle_estIcCampanha}" required="true" requiredMessage="#{bundle.CreateEstacaoRequiredMessage_estIcCampanha}"/>
                        <p:message for="estIcCampanha" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdAdicionalestado}" for="estCdAdicionalestado" />
                        <p:inputText id="estCdAdicionalestado" value="#{estacaoController.selected.estCdAdicionalestado}" title="#{bundle.CreateEstacaoTitle_estCdAdicionalestado}" />
                        <p:message for="estCdAdicionalestado" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estStrId}" for="estStrId" />
                        <p:inputText id="estStrId" value="#{estacaoController.selected.estStrId}" title="#{bundle.CreateEstacaoTitle_estStrId}" required="true" requiredMessage="#{bundle.CreateEstacaoRequiredMessage_estStrId}"/>
                        <p:message for="estStrId" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdIgpontopoligono}" for="estCdIgpontopoligono" />
                        <p:inputText id="estCdIgpontopoligono" value="#{estacaoController.selected.estCdIgpontopoligono}" title="#{bundle.CreateEstacaoTitle_estCdIgpontopoligono}" />
                        <p:message for="estCdIgpontopoligono" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdIgpontolinha}" for="estCdIgpontolinha" />
                        <p:inputText id="estCdIgpontolinha" value="#{estacaoController.selected.estCdIgpontolinha}" title="#{bundle.CreateEstacaoTitle_estCdIgpontolinha}" />
                        <p:message for="estCdIgpontolinha" />

                        <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdIggeometria}" for="estCdIggeometria" />
                        <p:inputText id="estCdIggeometria" value="#{estacaoController.selected.estCdIggeometria}" title="#{bundle.CreateEstacaoTitle_estCdIggeometria}" />
                        <p:message for="estCdIggeometria" />                       


                        <ui:remove> 
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estResId}" for="estResId" />
                            <p:inputText id="estResId" value="#{estacaoController.selected.estResId}" title="#{bundle.CreateEstacaoTitle_estResId}" />
                            <p:message for="estResId" />
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estIcBasica}" for="estIcBasica" />
                            <p:inputText id="estIcBasica" value="#{estacaoController.selected.estIcBasica}" title="#{bundle.CreateEstacaoTitle_estIcBasica}" />
                            <p:message for="estIcBasica" />
                            <p:inputText id="estIcEnergetica" value="#{estacaoController.selected.estIcEnergetica}" title="#{bundle.CreateEstacaoTitle_estIcEnergetica}" />
                            <p:message for="estIcEnergetica" />
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estIcNavegacao}" for="estIcNavegacao" />
                            <p:inputText id="estIcNavegacao" value="#{estacaoController.selected.estIcNavegacao}" title="#{bundle.CreateEstacaoTitle_estIcNavegacao}" />
                            <p:message for="estIcNavegacao" />
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estTcaId}" for="estTcaId" />
                            <p:inputText id="estTcaId" value="#{estacaoController.selected.estTcaId}" title="#{bundle.CreateEstacaoTitle_estTcaId}" />
                            <p:message for="estTcaId" />
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estTqcId}" for="estTqcId" />
                            <p:inputText id="estTqcId" value="#{estacaoController.selected.estTqcId}" title="#{bundle.CreateEstacaoTitle_estTqcId}" />
                            <p:message for="estTqcId" />
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdAdicionalPlu}" for="estCdAdicionalPlu" />
                            <p:inputText id="estCdAdicionalPlu" value="#{estacaoController.selected.estCdAdicionalPlu}" title="#{bundle.CreateEstacaoTitle_estCdAdicionalPlu}" />
                            <p:message for="estCdAdicionalPlu" />
                            <h:outputLabel value="#{bundle.CreateEstacaoLabel_estCdAdicionalFlu}" for="estCdAdicionalFlu" />
                            <p:inputText id="estCdAdicionalFlu" value="#{estacaoController.selected.estCdAdicionalFlu}" title="#{bundle.CreateEstacaoTitle_estCdAdicionalFlu}" />
                            <p:message for="estCdAdicionalFlu" />

                        </ui:remove>

                    </h:panelGrid>                    

                    <br />
                    
                    <p:commandButton action="#{estacaoController.create}" value="#{bundle.CreateEstacaoSaveLink}" /> &nbsp;
                    <p:commandButton action="#{estacaoController.prepareList}" value="#{bundle.CreateEstacaoShowAllLink}" immediate="true"/>

                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>

<!-- ######################### -->
<!--<fieldset>-->
<!--</fieldset>-->
<!--<legend><h:outputText value=""></h:outputText></legend>-->
<!--<h:message for="estId" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estNm" errorStyle="color: red" infoStyle="color: green" />-->
<!-- <h:message for="estCdPlu" errorStyle="color: red" infoStyle="color: green" /> --> 
<!--<h:message for="estCdFlu" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estIcCampanha" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estCdAdicionalestado" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estStrId" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estCdIgpontopoligono" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estCdIgpontolinha" errorStyle="color: red" infoStyle="color: green" />-->
<!--<h:message for="estCdIggeometria" errorStyle="color: red" infoStyle="color: green" />-->
<!-- Dados estão como null no banco de dados-->
<!--<h:panelGroup id="messagePanel" styleClass="ajustaListaMensagemErro"  layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
            </h:panelGroup>-->